//C.2 - H1, controlling for treatment
use "FILE PATH", clear
drop if attention==1
poisson misinfo_score age educ info_lit trust_gov trust_media preference white male knowledge inc treatment

//C.3 - H1, includes attention failers
use "FILE PATH", clear
poisson misinfo_score age educ info_lit trust_gov trust_media preference white male knowledge inc

//C.4 - H1, digital literacy *in addition to information literacy*
use "FILE PATH", clear
drop if attention==1
poisson misinfo_score dig_lit age educ info_lit trust_gov trust_media preference white male knowledge inc

//C.5 - H1, partisanship
use "FILE PATH", clear
drop if attention==1
poisson misinfo_score pid age educ info_lit trust_gov trust_media preference white male knowledge inc

//C.7 - H1, stricter preference
use "FILE PATH", clear
drop if attention==1
poisson misinfo_score age educ info_lit trust_gov trust_media preference_alt white male knowledge inc

//D.1 - H2, includes attention failers
use "FILE PATH", clear
ttest misinfo_score, by(treatment)

//D.2 - Balance tests
use "FILE PATH", clear
drop if attention==1
ttest age, by(treatment)
ttest educ, by(treatment)
ttest info_lit, by(treatment)
ttest trust_gov, by(treatment)
ttest trust_media, by(treatment)
prtest preference,by(treatment)
prtest white, by(treatment)
prtest male, by(treatment)
ttest knowledge,by(treatment)
ttest inc,by(treatment)

//E.2 - H3, includes attention failers
use "FILE PATH", clear
poisson misinfo_score c.age##i.treatment educ info_lit trust_gov trust_media preference white male knowledge inc
poisson misinfo_score age c.educ##i.treatment info_lit trust_gov trust_media preference white male knowledge inc
poisson misinfo_score age educ c.info_lit##i.treatment trust_gov trust_media preference white male knowledge inc
poisson misinfo_score age educ info_lit c.trust_gov##i.treatment trust_media preference white male knowledge inc
poisson misinfo_score age educ info_lit trust_gov c.trust_media##i.treatment preference white male knowledge inc
poisson misinfo_score age educ info_lit trust_gov trust_media i.preference##i.treatment white male knowledge inc

//E.3 - H3, digital literacy
use "FILE PATH", clear
drop if attention==1
poisson misinfo_score c.dig_lit##i.treatment age educ info_lit trust_gov trust_media preference white male knowledge inc
//chart:
margins treatment, at(dig_lit=(0(1)32) (mean) age educ info_lit trust_gov trust_media preference white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Misinformative" 4 "Factual") rows(1) color(%100)) xtitle(" ""Digital Literacy"" ") ylabel(.4(.2)1.4) ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(0(4)32) title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//E.4 - H3, partisanship
use "FILE PATH", clear
drop if attention==1
poisson misinfo_score c.pid##i.treatment age educ info_lit trust_gov trust_media preference white male knowledge inc
//chart:
label define plabels -3 "Str D" -2 "D" -1 "Lean D" 0 "Ind" 1 "Lean R" 2 "R" 3 "Str R"
label values pid plabels
margins treatment, at(pid=(-3(1)3) (mean) age educ info_lit trust_gov trust_media preference white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Misinformative" 4 "Factual") rows(1) color(%100)) xtitle(" ""Party ID"" ") ylabel(.4(.2)1.4) ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(-3(1)3) title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//E.5 - H3, political knowledge
use "FILE PATH", clear
drop if attention==1
poisson misinfo_score c.knowledge##i.treatment age educ info_lit trust_gov trust_media preference white male inc
//chart:
margins treatment, at(knowledge=(0(1)5) (mean) age educ info_lit trust_gov trust_media preference white male inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Misinformative" 4 "Factual") rows(1) color(%100)) xtitle(" ""Political Knowledge"" ") ylabel(.4(.2)1.4) ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(0(1)5) title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//E.6 - H3, stricter preference
use "FILE PATH", clear
drop if attention==1
poisson misinfo_score age educ info_lit trust_gov trust_media i.preference_alt##i.treatment white male knowledge inc
//chart:
margins treatment, at(preference_alt=(0(1)1) (mean) age educ info_lit trust_gov trust_media white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Misinformative" 4 "Factual") rows(1) color(%100)) xtitle(" ""Media Preference (alt)"" ") ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(0 "Factual" 1 "Misinformative")  ylabel(.4(.2)1.4) xlabel(-.11 " " 1.11 " ", add custom tlength(0)) title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//F.1a - H1 for Q1 only
use "FILE PATH", clear
drop if attention==1
poisson threat_wrong age educ info_lit trust_gov trust_media preference white male knowledge inc if treatment==0

//F.1b - H1 for Q2 only
use "FILE PATH", clear
drop if attention==1
poisson method_wrong age educ info_lit trust_gov trust_media preference white male knowledge inc if treatment==0

//F.2a - H2 for Q1 only
use "FILE PATH", clear
drop if attention==1
ttest threat_wrong, by(treatment)

//F.2b - H2 for Q2 only
use "FILE PATH", clear
drop if attention==1
ttest method_wrong, by(treatment)

//F.3a - H3 for Q1 only
use "FILE PATH", clear
drop if attention==1
logit threat_wrong c.age##i.treatment educ info_lit trust_gov trust_media preference white male knowledge inc
logit threat_wrong age c.educ##i.treatment info_lit trust_gov trust_media preference white male knowledge inc
logit threat_wrong age educ c.info_lit##i.treatment trust_gov trust_media preference white male knowledge inc
logit threat_wrong age educ info_lit c.trust_gov##i.treatment trust_media preference white male knowledge inc
logit threat_wrong age educ info_lit trust_gov c.trust_media##i.treatment preference white male knowledge inc
logit threat_wrong age educ info_lit trust_gov trust_media i.preference##i.treatment white male knowledge inc

//F.3b - H3 for Q2 only
use "FILE PATH", clear
drop if attention==1
logit method_wrong c.age##i.treatment educ info_lit trust_gov trust_media preference white male knowledge inc
logit method_wrong age c.educ##i.treatment info_lit trust_gov trust_media preference white male knowledge inc
logit method_wrong age educ c.info_lit##i.treatment trust_gov trust_media preference white male knowledge inc
logit method_wrong age educ info_lit c.trust_gov##i.treatment trust_media preference white male knowledge inc
logit method_wrong age educ info_lit trust_gov c.trust_media##i.treatment preference white male knowledge inc
logit method_wrong age educ info_lit trust_gov trust_media i.preference##i.treatment white male knowledge inc

//G - misinfo score DV includes Q3 responses (H1)
use "FILE PATH", clear
poisson misinfo_score age educ info_lit trust_gov trust_media preference white male knowledge inc

//G.2 - balance tests for clicking articles
use "FILE PATH", clear
drop if attention==1
ttest age, by(clicked_one)
ttest educ, by(clicked_one)
ttest info_lit, by(clicked_one)
ttest trust_gov, by(clicked_one)
ttest trust_media, by(clicked_one)
prtest preference,by(clicked_one)

//H - preference for misinformation
use "FILE PATH", clear
drop if attention==1
logit preference age educ info_lit trust_gov trust_media white male knowledge inc
logit preference_alt age educ info_lit trust_gov trust_media white male knowledge inc